package com.codejie.pms.service.impl;

import com.codejie.pms.entity.Customer;
import com.codejie.pms.mapper.CustomerMapper;
import com.codejie.pms.service.CustomerService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class CustomerServicelmpl implements CustomerService {

    @Resource
    private CustomerMapper customerMapper;

    //添加客户
    @Override
    public void addCustomer(Customer customer) {
        customerMapper.addCustomer(customer);
    }

    @Override
    public void updateCustomer(Customer customer) {
        customerMapper.updateCustomer(customer);
    }

    @Override
    public void deleteCustomer(String customerId) {
        customerMapper.deleteCustomer(customerId);
    }

    @Override
    public Customer getCustomer(String customerId) {
        return customerMapper.getCustomer(customerId);
    }

    @Override
    public void updateCustomerBySelf(Customer customer) {

    }

    @Override
    public Customer getCustomerByName(String customerName) {
        return customerMapper.getCustomerByName(customerName);
    }

    @Override
    public Customer getCustomer2(String projectId) {
        return customerMapper.getCustomer2(projectId);
    }

    @Override
    public List<Customer> selectCustomerList() {
        return customerMapper.selectCustomerList();
    }
}
